package com.open.capacity.finance.controller;

import com.open.capacity.commons.Result;
import com.open.capacity.finance.entity.SourceBaseFinalaccountTotal8;
import com.open.capacity.finance.service.SourceBaseFinalaccountTotal8Service;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * 决算报表
 *
 * @author
 * @email
 * @date 2023-01-31 16:45:00
 */
@RestController
@RequestMapping("sourcefinalaccounts")
@Api(tags = "记账凭证")
public class SourceFinalAccountController {

    @Autowired
    private SourceBaseFinalaccountTotal8Service finalaccountTotal8Service;

    /**
     * 本年的培训、会议、差旅情况
     */
    @RequestMapping("/list")
    public Result list(@RequestParam Map<String, Object> params) {
        params.put("kjkmNames", Arrays.asList("流动资产","非流动资产","受托代理资产","流动负债","非流动负债","受托代理负债","累计盈余"));
        List<SourceBaseFinalaccountTotal8> list = finalaccountTotal8Service.findAll(params);
        return Result.succeed(list);
    }
}
